﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.TeamPastMatches" Title=""
    Theme="SkinFile" Codebehind="TeamPastMatches.aspx.cs" %>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:LinkButton ID="TeamNameLinkButtonPageTitle" runat="server" CssClass="PageNameContentStyle"></asp:LinkButton>
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TeamPastMatches_PageNameLabel %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="CompletedMatchesLabel" runat="server" Text='<%$ Resources:Resource, Global_CompletedMatches %>' CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:Label ID="ConfirmNote" runat="server" Text=""></asp:Label>
        <br />
        <asp:GridView ID="CompletedMatchesGridView" runat="server" DataSourceID="CompletedMatchesSqlDataSource"
            SkinID="Professional" OnRowCommand="CompletedMatchesGridView_RowCommand" AutoGenerateColumns="False"
            AllowPaging="True" PageSize="20"  
            PagerSettings-Position="Bottom" >
            <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
                    Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
                <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Time %>" ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="TimeLabel" runat="server" Text='<%# Eval("Time")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("Type")) %>' 
                         ToolTip='<%# GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>' AlternateText='<%# GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>' />
                    </ItemTemplate>            
                </asp:TemplateField>            
                <asp:TemplateField ItemStyle-Width="45%">
                    <ItemTemplate>
                        <asp:HyperLink ID="MatchTitleHyperLink" runat="server" Text='<%# Eval("MatchTitle") %>'
                            NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, TeamPastMatches_ScoreHeaderText %>" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="ScoreLabel" runat="server" Text='<%# Eval("Score") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="17%">
                    <ItemTemplate>
                        <asp:HyperLink ID="ShowRatingsHyperLink" runat="server" NavigateUrl='<%# String.Format("~/MatchRatings.aspx?MatchId={0}&TeamId={1}", Eval("MatchId"), UserTeamId()) %>'
                            Text="<%$ Resources:Resource, TeamPastMatches_ShowRatingsHyperLink %>" SkinID="BlackHyperLinkSkin">
                        </asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="4%">
                    <ItemTemplate>
                        <asp:ImageButton ID="BookmarkLinkButton1" runat="server" Visible='<%# IsAllowBookMark() %>' OnClientClick='<%# BookmarkLinkButton1OnClientClick() %>'
                            CommandArgument='<%# Eval("MatchId") %>' CommandName="BookmarkMatch"
                            ImageUrl="~/Images/bookmarks.png"></asp:ImageButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="NoMatchesFoundLabel" runat="server" Text="<%$ Resources:Resource, TeamPastMatches_NoMatchesFoundLabel %>" SkinID="GridLabel" ></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="CompletedMatchesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetCompletedMatchesForTeam" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:LinkButton ID="BackToTeamMatchesLinkButton" runat="server" Text="<%$ Resources:Resource, TeamPastMatches_BackToTeamMatchesLinkButton %>"
            SkinID="TitleLink"></asp:LinkButton>
        <br />
        <br />
        <asp:LinkButton ID="TeamHomePageLinkButton" runat="server" Text="<%$ Resources:Resource, Global_TeamHomePage %>"
            SkinID="TitleLink"></asp:LinkButton>
    
    </div>
    </div>
</asp:Content>
